Post

Replies

Boosts

Views

Activity

Reply to TaskGroup Crash
I'm also seeing this issue on the same OS versions and devices. I think the bug may be that TaskGroups aren't properly inheriting the execution context of their parent tasks. For example, in: Task { @MainActor in   await withTaskGroup(of: Void.self) { taskGroup in     taskGroup.addTask {       foo()     }     bar()   } } I'd expect foo() and bar() to run on @MainActor since the task is run there, but it seems that on these specific OS versions that's not always the case.
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’23
Reply to Using @FocusedBinding with a Class to update a CommandMenu
I think what Apple would tell you to do would be to use the class-based Model like you gave in your example and rather than passing the model to your AppCommands, you would pass the playing property directly like: .focusedValue(\.playing, $model.playing) and your binding would become @FocusedBinding(\.playing) var playing: Bool?. That being said, I think this solution is less than ideal and Apple should add a FocusedObject or similar property. Having to pass these properties directly involves a lot of code duplication and reduces functionality. Your example is straightforward, but in a more complex case Model may wish to react to, intercept, or otherwise want to capture the value change directly and doing it this way makes that much harder.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to ASIdentifierManager.advertisingIdentifier hanging
I also ran into an (a crash in our case) when accessing ASIdentifierManager off the main thread; I suspect it has an undocumented main thread requirement. Reported to apple: FB14569567
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to SwiftData won't work with Measurement types
Issue still exists on Beta 8
Replies
Boosts
Views
Activity
Sep ’23
Reply to TaskGroup Crash
I'm also seeing this issue on the same OS versions and devices. I think the bug may be that TaskGroups aren't properly inheriting the execution context of their parent tasks. For example, in: Task { @MainActor in   await withTaskGroup(of: Void.self) { taskGroup in     taskGroup.addTask {       foo()     }     bar()   } } I'd expect foo() and bar() to run on @MainActor since the task is run there, but it seems that on these specific OS versions that's not always the case.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to Crash on [AVPlayer _addLayer] in iOS 16 caused by Pegasus
We are also seeing this crash exclusively on iOS 16.0 up through iOS 16.1 (latest at time of this comment), starting from when the iOS 16 beta was released. Has anyone found any reproduction steps or work arounds? We are using a base AVPlayer instance, not AVQueuePlayer, in our app.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to Using @FocusedBinding with a Class to update a CommandMenu
I think what Apple would tell you to do would be to use the class-based Model like you gave in your example and rather than passing the model to your AppCommands, you would pass the playing property directly like: .focusedValue(\.playing, $model.playing) and your binding would become @FocusedBinding(\.playing) var playing: Bool?. That being said, I think this solution is less than ideal and Apple should add a FocusedObject or similar property. Having to pass these properties directly involves a lot of code duplication and reduces functionality. Your example is straightforward, but in a more complex case Model may wish to react to, intercept, or otherwise want to capture the value change directly and doing it this way makes that much harder.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22